<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>
			6*:时间倒计时功能，倒计时10秒后，跳转到百度。页面要动态显示剩余时间</title>
			<style>
				#djs{`
					font-size: 56px;
				}
			</style>
		<script>
				var count = 5;
			function baidu() {
			
				if (count == 0) {
					location.href = "https://www.baidu.com"
				}
				document.getElementById("djs").innerHTML=count--;
			}
			setInterval(function() {
				baidu()
			}, 1000);
		</script> 
	</head>
	<body>
		<p id="djs"></p>
	</body>
</html>
